package cn.lopr.im.android.mvp.contact;

import java.util.List;
import java.util.Map;

import cn.lopr.im.android.bean.Article;
import cn.lopr.im.android.bean.ArticleComment;
import cn.lopr.im.android.bean.ArticleCommentVo;
import cn.lopr.im.android.bean.ArticlePlate;
import cn.lopr.im.android.bean.ArticleVo;
import cn.lopr.im.android.bean.CallbackResult;
import cn.lopr.im.android.bean.PageInfo;
import cn.lopr.im.android.common.OnCallBackListener;
import cn.lopr.im.android.common.ViewBase;

/**
 * @author shuangyang7
 * @date 2021/5/20 20:04
 */
public interface ICommunityContact {

    interface ICommunityPresenter {
        void getPlates(String token);

        void getArticleList(String token, String plateId, int page, int size);

        void delArticle(String token, String articleId);

        void updateArticleLikeNum(String token, String articleId, int num);

        void getArticleComment(String token, String articleId, int page, int size);
    }

    interface ICommunityView extends ViewBase {
        void getPlatesSuccess(List<ArticlePlate> articlePlates);

        void getArticleSuccess(PageInfo<ArticleVo> articles);

        void delArticleSuccess(List<ArticleVo> articles);

        void updateArticleSuccess(String msg);

        void getArticleCommentSuccess(List<ArticleCommentVo> articleCommentVos);
    }

    interface ICommunityModel {
        void getPlates(String token, OnCallBackListener<CallbackResult<List<ArticlePlate>>, String> onCallBackListener);

        /***********************************************************************文章 model*********************************************************************************************/
        void getArticleList(String token, String plateId, int page, int size, OnCallBackListener<CallbackResult<PageInfo<ArticleVo>>, String> onCallBackListener);

        void getArticle(String token, String articleId, OnCallBackListener<CallbackResult<ArticleVo>, String> onCallBackListener);

        void addArticle(String token, Article article, OnCallBackListener<CallbackResult<String>, String> onCallBackListener);

        void updateArticle(String token, Article article, OnCallBackListener<CallbackResult<String>, String> onCallBackListener);

        void delArticle(String token, String articleId, OnCallBackListener<CallbackResult<String>, String> onCallBackListener);

        /***********************************************************************文章评论 model*********************************************************************************************/
        void getArticleComment(String token, String articleId, int page, int size, OnCallBackListener<CallbackResult<List<ArticleCommentVo>>, String> onCallBackListener);

        void getArticleChildComment(String token, String parentId, int page, int size, OnCallBackListener<CallbackResult<List<ArticleCommentVo>>, String> onCallBackListener);

        void addArticleComment(String token, ArticleComment articleComment, OnCallBackListener<CallbackResult<String>, String> onCallBackListener);

        void getArticleLike(String token, String plateId, int page, int size, OnCallBackListener<CallbackResult<List<ArticleVo>>, String> onCallBackListener);

        void getArticleShare(String token, String plateId, int page, int size, OnCallBackListener<CallbackResult<List<ArticleVo>>, String> onCallBackListener);

        void getLikeMeLikeYouVisitPublish(Integer userId, OnCallBackListener<CallbackResult<Map<String, Integer>>, String> callbackResultStringOnCallBackListener);

        void getArticleListByUserId(String token, Integer userId, int page, int size, OnCallBackListener<CallbackResult<PageInfo<ArticleVo>>, String> callbackResultStringOnCallBackListener);
    }
}
